var util = require('../../utils/util.js')

//获取应用实例
var app = getApp()
Page({
  data: {

  },

  onLoad: function () {
  
  },

  onShow: function () {
    //清除用户还杆页面的定时器
    clearInterval(app.interval_id);
  },
  goReturnBallArm:function(){
     var that = this;
     wx.showLoading({ title: '请稍等', });
     var ball_arm_number = wx.getStorageSync('ball_arm_number'); 

    wx.request({
      url: app.data.servser + '/index/doUnlock',
      data: {
        session_id: wx.getStorageSync('session_id'),
        ball_arm_number: ball_arm_number
      },
      success: function (res) {
         wx.hideLoading()
         if(res.data.state == 1){
            var lock_number = res.data.lock_number; 
            wx.navigateTo({ url: '/pages/giveBack/giveBack?lock_number='+lock_number });
         }
      }
    }) 
  }
})
